package com.socodethis.spaceex;

import java.util.Comparator;

import com.badlogic.gdx.graphics.g2d.Sprite;
import com.socodethis.spaceex.math.cPoint;

//Was going to use this. too slow for what we are looking for
public class spriteOrganizer implements Comparator<spriteOrganizer> {
		private cPoint position;
		private Sprite sprite;
		private float seniority;
		public spriteOrganizer(cPoint position, Sprite sprite){
			this.position = position;
			this.sprite = new Sprite(sprite);
			this.seniority = (position.getX()+position.getY()*10);
		}
		public spriteOrganizer() {
			// TODO Auto-generated constructor stub
		}
		public Sprite returnSprite(){
			return this.sprite;
		}
		@Override
		public int compare(spriteOrganizer o1, spriteOrganizer o2) {
			// TODO Auto-generated method stub
			return (o1.seniority>o2.seniority ? -1 : (o1.seniority==o2.seniority ? 0 : 1));
		}
}
